<?php
/**
 * @author Artur Bier <izatop@gmail.com>
 * @package Files 
 *
 * @copyright TinyWEB CMS
 * @link http://tinywebcms.ru
 * @link http://cms.vingrad.ru
 * @version SVN: $Id$ 
 */
 
/**
 * FilesEraser
 */
class FilesEraser extends Files
{
    private $path;
    
    public function __construct($path)
    {
        $this->path = $path;
    }
    
    public function remove()
    {
        if(!unlink($this->path) || is_file($this->path)) {
            throw new Exception("Can't remove file: {$this->path}");
        }
        
        return true;
    }
}

/**
 * Tab: 4 spaces
 * Encoding: utf-8
 */
?>